Add ARMv8.2 ID_AA64MMFR0_EL1.PARange value
authorAntonio Nino Diaz <antonio.ninodiaz@arm.com>
Fri, 17 Nov 2017 09:52:53 +0000 (09:52 +0000)
committerAntonio Nino Diaz <antonio.ninodiaz@arm.com>
Fri, 17 Nov 2017 09:52:53 +0000 (09:52 +0000)
If an implementation of ARMv8.2 includes ARMv8.2-LPA, the value 0b0110
is permitted in ID_AA64MMFR0_EL1.PARange, which means that the Physical
Address range supported is 52 bits (4 PiB). It is a reserved value
otherwise.

Change-Id: Ie0147218e9650aa09f0034a9ee03c1cca8db908a
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
include/lib/aarch64/arch.h
lib/xlat_tables/aarch64/xlat_tables.c
lib/xlat_tables_v2/aarch64/xlat_tables_arch.c

index cb7dab7ff32a8b0a207056e4608df089302a18eb..1cf880f79d1c001de70cb9f779c5715fb72ffced 100644 (file)
 #define PARANGE_0011   U(42)
 #define PARANGE_0100   U(44)
 #define PARANGE_0101   U(48)
+#define PARANGE_0110   U(52)
 
 #define ID_AA64MMFR0_EL1_TGRAN4_SHIFT          U(28)
 #define ID_AA64MMFR0_EL1_TGRAN4_MASK           U(0xf)
index 28ae1f73becff92d6d40b5a1a536823baed75866..eabc3df9ac2ac9502d84c3326ac7de2bae900eb3 100644 (file)
@@ -60,7 +60,10 @@ static unsigned long long calc_physical_addr_size_bits(
 /* Physical Address ranges supported in the AArch64 Memory Model */
 static const unsigned int pa_range_bits_arr[] = {
        PARANGE_0000, PARANGE_0001, PARANGE_0010, PARANGE_0011, PARANGE_0100,
-       PARANGE_0101
+       PARANGE_0101,
+#if ARM_ARCH_AT_LEAST(8, 2)
+       PARANGE_0110,
+#endif
 };
 
 static unsigned long long get_max_supported_pa(void)
index 433110794001851196e968eec8dd9a0b81b45d37..aa5b9e5461bea1aa08cdb881c8fc6913ec9f3a8b 100644 (file)
@@ -48,7 +48,10 @@ unsigned long long tcr_physical_addr_size_bits(unsigned long long max_addr)
 /* Physical Address ranges supported in the AArch64 Memory Model */
 static const unsigned int pa_range_bits_arr[] = {
        PARANGE_0000, PARANGE_0001, PARANGE_0010, PARANGE_0011, PARANGE_0100,
-       PARANGE_0101
+       PARANGE_0101,
+#if ARM_ARCH_AT_LEAST(8, 2)
+       PARANGE_0110,
+#endif
 };
 
 unsigned long long xlat_arch_get_max_supported_pa(void)